package com.at.service;

import com.at.domain.Blog;
import com.at.domain.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @author : code1997
 * @date :2020-09-2020/9/28 9:13
 */
public interface BlogService {

    Blog getBolg(Long id);

    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);

    Page<Blog> listBlog(Pageable pageable);

    Page<Blog> listBlogByTagId(Pageable pageable,Long tagId);

    Page<Blog> listBlogByQuery(Pageable pageable,String query);

    List<Blog> listRecommedBlogTop(Integer size);

    Blog saveBlog(Blog blog);

    Blog updateBlog(Long id, Blog blog);

    void deleteBlog(Long id);

    Blog getBolgAndConvert(Long id);

    Map<String,List<Blog>> archivesBlog();

    Long getBlogCount();


}
